home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <WFile.h>
-
- // this program will display a text file on the screen
-
- int main(int argc, char* argv[])
- {
- if (argc==1) puts("usage: example3 <filename.ext>\n\ntext files only!");
- else if (argc==2)
- {
- if (FileExists(argv[1]))
- {
- TextFile F(argv[1]);
- char Buffy[1000];
- while(F.Read(Buffy)) puts(Buffy);
- }
- }
- return 0;
- }
-